package site.suimu.service.impl;

import org.springframework.stereotype.Service;
import site.suimu.mapper.TSearchMapper;
import site.suimu.pojo.TSearch;
import site.suimu.service.TSearchService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TSearchServiceImpl implements TSearchService {

    @Resource
    TSearchMapper tSearchMapper;

    public boolean ins(TSearch tSearch) {
        if(tSearchMapper.create(tSearch)>0){
            return true;
        }
        return false;
    }

    public boolean dle(int id) {
        if(tSearchMapper.delete(id)>0){
            return true;
        }
        return false;
    }

    public List<TSearch> sleByUid(int uid) {
        return tSearchMapper.selectByUid(uid);
    }
}
